package com.aliyun.messagemgt.dto.base;

import java.io.Serializable;
import java.util.Objects;

/**
 * Created with IDEA
 *
 * @author:zhangxingxing 0027012120
 * @date:2019/3/8
 * @time:15:06
 */
public class FourAObjectEntity implements Serializable {

    private static final long serialVersionUID = -174561258461L;
    private String name;

    private String key;

    public String getName() {
        return name;
    }

    public FourAObjectEntity setName(String name) {
        this.name = name;
        return this;
    }

    public String getKey() {
        return key;
    }

    public FourAObjectEntity setKey(String key) {
        this.key = key;
        return this;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("FourAObjectEntity{");
        sb.append("name='").append(name).append('\'');
        sb.append(", key='").append(key).append('\'');
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FourAObjectEntity that = (FourAObjectEntity) o;
        return Objects.equals(getName(), that.getName()) &&
                Objects.equals(getKey(), that.getKey());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getName(), getKey());
    }
}
